package com.example.dakotanews.dto;

import com.example.dakotanews.entity.News;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class NewsEditFormDTO {

    private String title;
    private Integer sortId;
    private String cover;
    private String summary;
    private String content;
    private List<String> issues;

    public NewsEditFormDTO(News news) {
        this.title = news.getTitle();
        this.sortId = news.getSortId();
        this.cover = news.getCover();
        this.summary = news.getSummary();
        this.content = news.getContent();
    }
}
